#! /bin/sh
#
# $Id$
#

CHMOD="/bin/chmod"
KILLALL="/usr/bin/killall"
TOUCH="/usr/bin/touch"

SYSLOGD_CONF="${PKG_DESTDIR-}/etc/syslog.conf"

if [ $2 != "POST-INSTALL" ]; then
    ${TOUCH} /var/log/all.log /var/log/console.log
    ${CHMOD} 600 /var/log/all.log /var/log/console.log

    echo -n "Spamming ${SYSLOGD_CONF}..."
    cat >> ${SYSLOGD_CONF} << EOF
# Begin syslogConf settings
# Do not touch these lines
console.info					/var/log/console.log
*.*						/var/log/all.log
*.*						@loghost
# End syslogConf settings
EOF

    ${KILLALL} -1 syslogd

    echo " Done."
fi
